package com.excellent.mvvm.adapter

import android.content.Context
import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import com.chad.library.adapter4.BaseDifferAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder

abstract class DifferAdapter<T : Any>(
    private val layoutId: Int,
    callback: DiffUtil.ItemCallback<T>
) :
    BaseDifferAdapter<T, QuickViewHolder>(
        callback
    ) {
    override fun onCreateViewHolder(
        context: Context,
        parent: ViewGroup,
        viewType: Int,
    ): QuickViewHolder {
        return QuickViewHolder(layoutId, parent)
    }
}